# -*- coding:utf-8 -*-
# @Time:2024/4/1921:01
# @Author:miuzg
# @FileName:new test2.py
# @Software:PyCharm
import js2py

with open('test.js','r') as f:
    js_code = f.read()

js = js2py.EvalJs() # 生成一个js解析对象
js.execute(js_code) # 把js代码放到对象里

res = js.output('miuzg')
print(res)